package cn.hubujyjs.lp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;

/**
 * 
 * @TableName file_tree
 */
@TableName(value ="file_tree")
@Data
public class FileTree implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 目录名或文件名
     */
    private String label;

    /**
     * 父级id
     */
    private Integer parentId;

    /**
     * 文件id
     */
    private Integer fileId;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private List<FileTree> children = new ArrayList<>();
}